package com.ruoyi.system.api.factory;

import com.ruoyi.system.api.RemoteALYService;
import com.ruoyi.system.api.RemoteQYMessageService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.List;

/**
 * 阿里云服务降级处理
 *
 * @author ruoyi
 */
@Component
public class RemoteALYFallbackFactory implements FallbackFactory<RemoteALYService>
{
    private static final Logger log = LoggerFactory.getLogger(RemoteALYFallbackFactory.class);

    @Override
    public RemoteALYService create(Throwable throwable)
    {
        log.error("阿里云调用失败:{}", throwable.getMessage());
        return new RemoteALYService()
        {


            @Override
            public String send(String appkey, String format, String token, String audio_address) {
                return null;
            }
        };
    }
}
